<style scoped>
	.infocom{
		padding-top: 15px;
	}
	.infocom_map{
		width: 100%;
		height: 350px;
		margin-top: 25px;
	}
	.infocom_top{
		text-align: center;
	}
	.infocom_img{
		width: 28%;
		border: 1px solid #2DB7F5;
	}
	.infocom_but{
		padding: 1px 15px;
		margin-top: 5px;
	}
	.infocom_mid{
		margin-top: 30px;
		padding-left: 15px;
		color: #666666;
	}
</style>
<template>
    <div class="infocom">
    	<div class="infocom_top">
    		<img src="../../../../static/img/index_img/7.png" class="infocom_img"/>
	        <h2>西域机电</h2>
	        <Button type="primary" class="infocom_but">关注</Button>
    	</div>
        <div class="infocom_mid">
        	<div><span>领域/融资&nbsp;:&nbsp;</span><span>&nbsp;{{financing}}</span></div>
        	<div><span>公司规模&nbsp;:&nbsp;</span><span>&nbsp;{{size}}</span></div>
        	<div><span>公司地址&nbsp;:&nbsp;</span><span>&nbsp;{{cityName}}</span></div>
        </div>
        <div class="infocom_map">
        	<baidu-map :center="center" :zoom="zoom" @ready="handler" style="height:300px" @click="getClickInfo">
	  		    <bm-navigation anchor="BMAP_ANCHOR_TOP_RIGHT"></bm-navigation>
            </baidu-map>
        </div>
    </div>
</template>
<script>
	export default {
    	name: 'InfoComp',
        data () {
            return {
            	center: {lng:0, lat:0},
	     		zoom:17,
	     		cityName:"上海市浦东新区祖冲之路1077号张江高科凌阳大厦4楼",
	     		size:1000,
	     		financing:"电子商务，D轮"
            }
        },
        methods: {
	        handler ({BMap, map}) {
					map.enableScrollWheelZoom();   //启用滚轮放大缩小，默认禁用
					map.enableContinuousZoom();    //启用地图惯性拖拽，默认禁用
					var city = this.cityName;
					map.centerAndZoom(city,17);      // 用城市名设置地图中心点
					/*this.center.lng =113.822348
			      	this.center.lat =22.635538*/
			     	this.zoom =this.zoom
			},
			getClickInfo (e) {
					this.center.lng = e.point.lng
					this.center.lat = e.point.lat
	       }
    	}
    }
</script>
